<?php

///////////////////////
// To be chunked off //
///////////////////////
require_once 'classes/Config.class.php';
require_once 'classes/Library.class.php';
require_once 'classes/Smarty/Smarty.class.php';

$config = Config::load(dirname(__FILE__),'dev');
$lib = new Library();
$smarty = new Smarty();

$smarty->compile_dir = 'templates/compile';
$smarty->cache_dir = 'templates/cache';
$smarty->template_dir = 'templates';

$config = $lib->arr2obj($config);

try{
	$db = new PDO($config->database->type.':host='.$config->database->server.';dbname='.$config->database->name, $config->database->username, $config->database->password);
}catch (Exception $e){
	die($e->getMessage());
}
//////////////////////
///////// End ////////
//////////////////////


$con = $db->prepare("select * from news sort by dateAdded DESC limit 10");
$res = $con->execute();


?>